#!/bin/bash
set -euo pipefail
BaseDir=$(cd "$(dirname "$0")"; pwd)
cd ${BaseDir}

# https://indigo-dc.github.io/udocker/user_manual.html
udocker -V ||  { 
    pip install udocker
}

echo "Using udocker to run..."

udocker pull docker.m.daocloud.io/busybox

udocker run --name=test --rm docker.m.daocloud.io/busybox sh -c "echo 'hello world'"
udocker ps
udocker images

echo "done"